# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-xmp-toolkit
pkgver=2.0.1
pkgrel=8
pkgdesc='A library for working with XMP metadata.'
arch=('any')
url='https://pypi.org/project/python-xmp-toolkit/'
license=(custom)
depends=('python' 'exempi' 'python-pytz')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('79dd3b4ba57e48af8980e25cf55215ed7bc654843354a54c0e8688bdcec1ac16e602a7e7d9d7bd83e9e424f189372c576ccef395e0bb220d3545c1135eff320a')

build() {
  cd "$pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $pkgname
}

